﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Model;
using Controller;

namespace Facade
{
    public class SubTypeKPIFacade
    {
        public string Save(SubTypeKPI SubTypes)
        {
            SubTypeKPIController cont = new SubTypeKPIController();
            return cont.Save(SubTypes);
        }

        public string Delete(SubTypeKPI SubTypes)
        {
            SubTypeKPIController cont = new SubTypeKPIController();
            return cont.Delete(SubTypes);
        }

        public IList<SubTypeKPI> GetAll(string sSearch, int PageNumber, int DataLength, string SortCol, string SortDirection, out int TotalData)
        {
            IList<SubTypeKPI> SubTypes = new List<SubTypeKPI>();
            SubTypeKPIController cont = new SubTypeKPIController();
            SubTypes = cont.GetAll(sSearch, PageNumber, DataLength, SortCol, SortDirection, out TotalData);
            return SubTypes;
        }

        public IList<SubTypeKPI> GetAllSubTypeKPIsByTypeKPIID(int TypeKPIID, string sSearch, int PageNumber, int DataLength, int SortCol, string SortDirection, out int TotalData)
        {
            IList<SubTypeKPI> SubTypes = new List<SubTypeKPI>();
            SubTypeKPIController cont = new SubTypeKPIController();
            SubTypes = cont.GetAllSubTypeKPIsByTypeKPIID(TypeKPIID, sSearch, PageNumber, DataLength, SortCol, SortDirection, out TotalData);
            return SubTypes;
        }

        public SubTypeKPI GetSubTypeKPIByID(int ID)
        {
            SubTypeKPI SubTypes = new SubTypeKPI();
            SubTypeKPIController cont = new SubTypeKPIController();
            SubTypes = cont.GetSubTypeKPIByID(ID);
            return SubTypes;
        }

        public SubTypeKPI GetSubTypeKPIByDescription(string Description, int TypeID)
        {
            SubTypeKPI SubTypes = new SubTypeKPI();
            SubTypeKPIController cont = new SubTypeKPIController();
            SubTypes = cont.GetSubTypeKPIByDescription(Description, TypeID);
            return SubTypes;
        }
    }
}